import request from '@/utils/request'

// 获取位置树形结构
export function getLocationTree() {
  return request.get('/system/location/list')
}

// 获取资产位置列表
export function getAssetLocationList(data) {
  return request.get('/system/location/allList', { params: data })
}

// 添加资产位置
export function addAssetLocation(data) {
  return request.post('/system/location', data)
}

// 删除资产位置
export function deleteAssetLocation(id) {
  return request.delete(`/system/location/${id}`)
}

// 查找资产位置详情
export function getAssetLocationDetail(id) {
  return request.get(`/system/location/${id}`)
}

// 修改资产位置
export function updateAssetLocation(data) {
  return request.put(`/system/location`, data)
}